//
//  AppDelegate.swift
//  weibo
//
//  Created by 叶子韬韬 on 2017/4/10.
//  Copyright © 2017年 叶子韬韬. All rights reserved.
//

import UIKit

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

    var window: UIWindow?

    var defaultViewController : UIViewController? {
        
        let isLogin = UserAccoutViewModel.shareInstance.isLogin
        
        return isLogin ? WeclomeViewController() : UIStoryboard(name: "Main", bundle: nil).instantiateInitialViewController()
        
    }
    

    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
        // Override point for customization after application launch.
        
        // MARK:- 设置全局参数
        UITabBar.appearance().tintColor = UIColor.orange
        UINavigationBar.appearance().tintColor = UIColor.orange
//
        //创建window
        window = UIWindow(frame: UIScreen.main.bounds)
        window?.rootViewController = defaultViewController
        window?.makeKeyAndVisible()
    
        
        return true
    }

   

}

